import request from '@/utils/request'

const api_name = '/sx/workOrder'

export default {

    // 提交工单
    submitWorkOrder(data) {
        return request({
            url: `${api_name}/submit`,
            method: 'post',
            data: data
        })
    },


    // 提交消息
    submitWorkMessage(data) {
        return request({
            url: `/sx/workMessage/submit`,
            method: 'post',
            data: data
        })
    },


    // 加载消息
    list(params) {
        return request({
            url: `${api_name}/list`,
            method: 'get',
            params: params
        })
    },


    // 加载未读消息数量
    getAllUnReadMessage() {
        return request({
            url: `/sx/workMessage/getAllUnReadMessage`,
            method: 'get',
        })
    },


    // 工单详情
    workOrderDetail(params) {
        return request({
            url: `${api_name}/workOrderDetail`,
            method: 'get',
            params: params
        })
    },

}
